package casa.depesos.app.com.http.req;


import casa.depesos.app.com.http.HttpReq;
import casa.depesos.app.com.http.Req;
import casa.depesos.app.com.http.ReqCallback;
import casa.depesos.app.com.http.bean.FailInfoBean;
import casa.depesos.app.com.http.data.FailInfo;
import casa.depesos.app.com.http.parser.FailInfoParser;
import casa.depesos.app.com.utils.Constant;
import casa.depesos.app.com.utils.Utils;
import okhttp3.FormBody;

public class RiskFailReq implements HttpReq<FailInfoBean> {
    @Override
    public void req(ReqCallback<FailInfoBean> callback) {//   /app/riskTask/queryRiskFailInfo
        if (Constant.white) {
            FailInfoBean tmp = new FailInfoBean();
            tmp.info = new FailInfo();
            tmp.info.countDownTime = Utils.getRefuseCountDown() + "";
            callback.callback(true, tmp);
            return;
        }
        FormBody.Builder builder = new FormBody.Builder()
                .add("reqnum", Constant.getApplyId());
        Req.post("/app/riskTask/fetchRiskFailureDetails", getParam(), getHeader(), builder.build(), new FailInfoParser(), callback, this);
    }
}
